﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace ProjectBase.Mvc
{
    /// <summary>
    ///     Provides simple user access to all possible settings of the TreeView abilities
    /// </summary>
    public class TreeViewSettings
    {
        /// <summary>
        ///     If set to true, the TreeView keeps the list of the Expanded nodes in the Session.
        ///     When there is return to the page, where this TreeView was already adjusted (expanded or collapsed)
        ///     - last state can be "re-created"
        /// </summary>
        public virtual Boolean KeepExpandedNodesInTheSession { get; set; }

        /// <summary>
        ///     Extend nodes with Check boxes
        /// </summary>
        public virtual Boolean ShowCheckBoxes { get; set; }

        /// <summary>
        ///     Provide the displayed text with anchor functionality
        /// </summary>
        public virtual Boolean ShowAnchors { get; set; }

        /// <summary>
        ///     Decorate nodes with images
        /// </summary>
        public virtual Boolean ShowImages { get; set; }

        /// <summary>
        ///     The value will be used for name attribute of every checkbox.
        ///     If null, the TreeView ID is used
        /// </summary>
        public virtual string CheckBoxInputName { get; set; }

        /// <summary>
        ///     How deep should be TreeView expanded. Default is 0 == root
        /// </summary>
        public virtual int LevelExpanded { get; set; }

        /// <summary>
        ///     From which level should the nodes be checked.
        ///     Default is 0 == root and all descendants.
        /// </summary>
        public virtual int LevelChecked { get; set; }

        /// <summary>
        ///     The relative path to the image which sould be displayed
        ///     as a sign for Opened node e.g '/i/image.png'
        /// </summary>
        public virtual String ImageNodeOpenedPath { get; set; }

        /// <summary>
        ///     The relative path to the image which sould be displayed
        ///     as a sign for Closed node e.g '/i/image.png'
        /// </summary>
        public virtual String ImageNodeClosedPath { get; set; }

        /// <summary>
        ///     The relative path to the image which sould be displayed
        ///     as a sign for Leaf (node without children) e.g '/i/image.png'
        /// </summary>
        public virtual String ImageLeafPath { get; set; }

        /// <summary>
        ///     The displayed Text will be extended with ID value
        /// </summary>
        public virtual Boolean ShowTextWithId { get; set; }

        /// <summary>
        ///     The separator which results in 'ID - Text'.
        ///     This property could be for example set to: ' - '
        /// </summary>
        public virtual String TextWithIdSeparator { get; set; }

        /// <summary>
        ///     If true, than Resource manager is called for localizing the Text attribute of every node
        ///     default = 'false'
        /// </summary>
        public virtual bool DoLocalize { get; set; }

        /// <summary>
        ///     Allows to generally cut the length of displayed node text.
        ///     The full length is provided in the title
        /// </summary>
        public virtual int? MaxTextSize { get; set; }
    }
}